From: Daniel GarcĂ­a Moreno Date: Thu, 12 Nov 2020 09:38:17 +0000 (+0100) Subject: appDisplay: don't change grid page on adaptToSize X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~760 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8eec7ae2d8a19ef267140bfb00cda974b55faddd;p=gnome-shell.git appDisplay: don't change grid page on adaptToSize If the adapt to size occurs after the grid page has been changed the page is set to zero. This patch just keep the current page with the same value that it has before. Fix https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3388 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 8e10de2d8..6c7d1f457 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -844,9 +844,9 @@ var BaseAppView = GObject.registerClass({ this._pageIndicators.nPages !== this._grid.nPages) { Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => { this._adjustment.value = 0; - this._grid.currentPage = 0; + this.goToPage(this._grid.currentPage); this._pageIndicators.setNPages(this._grid.nPages); - this._pageIndicators.setCurrentPosition(0); + this._pageIndicators.setCurrentPosition(this._grid.currentPage); return GLib.SOURCE_REMOVE; }); }